package com.lancoo.cvas.service;

import com.lancoo.cvas.entity.Course;
import com.lancoo.cvas.entity.Student;
import com.lancoo.cvas.entity.TeachingClass;
import com.lancoo.cvas.pojo.vo.*;
import com.lancoo.cvas.util.Result;
import io.swagger.annotations.ApiParam;
import org.omg.CORBA.StringHolder;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface SubClassService {
    /**
     * 获取拆班班级记录
     * @param taskId
     * @param flag
     * @param gradeId
     * @param keyword
     * @return
     */
    List<SubClassDto> getSubClassList(Integer taskId, Integer flag, String gradeId, String keyword);

    /**
     * 删除拆班班级
     * @param taskId
     * @param subIds
     * @return
     */
    String deletedSubClass(Integer taskId, List<String> subIds);

    /**
     * 获取教学班List
     * @param taskId
     * @return
     */
    List<ClassInfoDto> getClassList(Integer taskId);

    /**
     * 获取拆班课程列表
     * @param taskId
     * @param classId
     * @return
     */
    List<SubCourseDto> getSubCourse(Integer taskId, Long classId);


    /**
     * 添加单双号拆班
     * @param taskId
     * @param subInputs
     * @return
     */
    Result addOddEvenSubClass(Integer taskId, String subId , List<SubInput> subInputs);

    /**
     * 获取开课计划树
     * @param taskId
     * @return
     */
    List<TeachingClassTree> getTeachingClassTree(Integer taskId, Integer module);

    /**
     * 获取行政班对应的教学班列表
     * @param taskId
     * @param typeId
     * @param courseId
     * @param isEnable
     * @return
     */
    TeachingClassByClass getClassInfoList(Integer taskId,String gradeId, Integer typeId, Long courseId,Long classId, Integer isEnable);

    /**
     * 获取选课教学班
     * @param taskId
     * @param teachingClassId
     * @param gradeId
     * @param courseId
     * @param isEnable
     * @return
     */
    TeachingClassBySelect getSelectClassList(Integer taskId, Long teachingClassId, String gradeId, Long courseId, Integer isEnable,Integer pageSize,Integer currentPage);

    /**
     * 获取拆班教学班
     * @param taskId
     * @param teachingClassId
     * @param subType
     * @param gradeId
     * @param courseId
     * @param isEnable
     * @return
     */
    TeachingClassBySub getSubClassInfoList(Integer taskId, Long teachingClassId, Integer subType, String gradeId, Long courseId, Integer isEnable,Integer pageSize,Integer currentPage);

    /**
     * 获取常规拆班对应的行政班列表
     * @param taskId
     * @param courseId
     * @param keyword
     * @return
     */
    List<SubGradeDto> getRegularSubClassList(Integer taskId, Long courseId);

    /**
     * 添加教学班
     * @param taskId
     * @param courseId
     * @param teachingClassList
     * @return
     */
    String addRegularSubClass(Integer taskId, String uuid, AddRegularSubDto addRegularSubDto);

    /**
     * 获取对应uuid下的教学班
     * @param taskId
     * @param uuid
     * @return
     */
    List<TeachingClass> updateRegularSubClassList(Integer taskId, String uuid);

    /**
     * 获取单双号拆班列表
     * @param taskId
     * @param subId
     * @return
     */
    AddOddEvenDto getOddEvenSubClass(Integer taskId, String subId);

    /**
     * 修改单双拆班
     * @param taskId
     * @param subId
     * @param teachingClassId
     * @param teacherId
     * @param teacherName
     * @param roomId
     * @param roomName
     * @return
     */
    String updateOddEvenSubClass(Integer taskId, String subId, List<Long> teachingClassId, Long teacherId, String teacherName, Long roomId);

    /**
     * 删除单双号拆班列表
     * @param taskId
     * @param subId
     * @param data
     * @return
     */
    Result deletedOddEvenSubClass(Integer taskId, String subId, List<DeletedOddEvenDto> data);

    /**
     * 获取常规拆班对应的课程列表
     * @param taskId
     * @return
     */
    List<Course> getRegularSubCourseList(Integer taskId);


    /**
     * 获取常规拆班列表
     * @param taskId
     * @param uuid
     * @return
     */
    AddRegularDto getRegularSubClass(Integer taskId,Long courseId, String uuid);

    /**
     * 修改常规拆班
     * @param taskId
     * @param subId
     * @param teachingClassId
     * @param teacherId
     * @param teacherName
     * @param roomId
     * @return
     */
    String updateRegularSubClass(Integer taskId, String subId, Long teachingClassId, Long teacherId, String teacherName, Integer roomType);

    /**
     * 移除常规拆班学生
     * @param taskId
     * @param teachingClassId
     * @param studentIds
     * @return
     */
    String deletedRegularStudent(Integer taskId, Long teachingClassId, List<Long> studentIds);



    /**
     * 获取可以选择的学生列表
     * @param taskId
     * @param uuid
     * @return
     */
    List<Student> getRegularStudent(Integer taskId, String uuid);

    /**
     * 添加移除学生
     * @param taskId
     * @param teachingClassId
     * @param studentDtos
     * @return
     */
    String addRegularStudent(Integer taskId, Long teachingClassId, List<Long> studentIds,String uuid);

    /**
     *删除常规拆班
     * @param taskId
     * @param uuid
     * @param teachingClassId
     * @param courseId
     * @return
     */
    String deletedRegularSubClassList(Integer taskId, String uuid, Long teachingClassId, Long courseId);


    /**
     * 通过教学班获取学生列表
     * @param taskId
     * @param teachingClassId
     * @return
     */
    List<Student> getStudentList(Integer taskId, Long teachingClassId,String keyword);

    /**
     * 添加到学生
     * @param taskId
     * @param fromTeachingClassId
     * @param toTeachingClassId
     * @param studentDtos
     * @return
     */
    String addToRegularStudent(Integer taskId, Long fromTeachingClassId, Long toTeachingClassId, List<Long> studentDtos);

    /**
     * 获取合班列表
     * @param taskId
     * @param teachingClassId
     * @param gradeId
     * @param courseId
     * @param isEnable
     * @return
     */
    TeachingClassByMerge getMixedClassInfoList(Integer taskId, Long teachingClassId, String gradeId, Long courseId, Integer isEnable);

    /**
     * 合班操作
     * @param taskId
     * @param teachingClassIds
     * @return
     */
    String MergeTeachingClassList(Integer taskId, MergeTeachingClassDto mergeTeachingClassDto);

    /**
     * 获取合班后的数据
     * @param taskId
     * @param uuid
     * @return
     */
    TeachingClassMergeInfo getMergeTeachingClass(Integer taskId, String uuid);



    /**
     * 批量修改考核方式
     * @param taskId
     * @param teachingClassIds
     * @param assessmentId
     * @return
     */
    String updateBatchAssessment(Integer taskId, List<Long> teachingClassIds, Integer assessmentId);

    /**
     * 批量修改连上节次
     * @param taskId
     * @param teachingClassIds
     * @param connectSection
     * @return
     */
    String updateBatchConnectSection(Integer taskId, List<Long> teachingClassIds, Integer connectSection);

    /**
     * 批量修改连上次数
     * @param taskId
     * @param teachingClassIds
     * @param connectNumber
     * @return
     */
    String updateBatchConnectNumber(Integer taskId, List<Long> teachingClassIds, Integer connectNumber);

    /**
     * 批量修改周次
     * @param taskId
     * @param teachingClassIds
     * @param week
     * @return
     */
    Result updateBatchWeek(Integer taskId, UpdateBatchWeekInput teachingClassIds);

    /**
     * 获取其他教学班信息
     * @param taskId
     * @param teachingClassId
     * @param uuid
     * @return
     */
    List<OtherTeachingClassList> getOtherTeachingClassList(Integer taskId, Long teachingClassId, String uuid);

    /**
     * 修改周次
     * @param taskId
     * @param teachingClassId
     * @param week
     * @return
     */
    Result updateWeek(Integer taskId, Long teachingClassId, Integer hourType, String week, Integer totalHour, Integer flag,Integer connectSection,Integer connectNumber,Integer sign,Integer startWeek,Integer endWeek);

    /**
     * 修改连上次数
     * @param taskId
     * @param teachingClassId
     * @param hourType
     * @param connectNumber
     * @return
     */
    String updateConnectNumber(Integer taskId, Long teachingClassId, Integer hourType, Integer connectNumber);

    /**
     * 修改连上节次
     * @param taskId
     * @param teachingClassId
     * @param hourType
     * @param connectSection
     * @return
     */
    String updateConnectSection(Integer taskId, Long teachingClassId, Integer hourType, Integer connectSection);


    /**
     * 是否可以进行合班
     * @param taskId
     * @param teachingClassIds
     * @return
     */
    Boolean whetherMixClass(Integer taskId, List<Long> teachingClassIds);

    /**
     * 获取教学班列表
     * @param taskId
     * @param teachingClassIds
     * @return
     */
    List<CourseInformation> getTeachingClassList(Integer taskId, List<Long> teachingClassIds);

    /**
     * 通过uuid获取合班信息
     * @param taskId
     * @param uuid
     * @return
     */
    TeachingClassMergeInfo getMergeTeaching(Integer taskId, String uuid);


    /**
     * 导出对应的行政班
     * @param response
     * @param taskId
     * @param typeId
     * @param typeName
     * @param classId
     * @param className
     * @param gradeId
     * @param gradeName
     * @param courseId
     * @param courseName
     * @param isEnable
     * @return
     */
    void classToExcel(HttpServletResponse response, Integer taskId, Integer typeId, String typeName, Long classId, String className, String gradeId, String gradeName, Long courseId, String courseName, Integer isEnable);

    /**
     * 导出对应选课教学班
     * @param taskId
     * @param teachingClassId
     * @param teachingClassName
     * @param gradeId
     * @param gradeName
     * @param courseId
     * @param courseName
     * @param isEnable
     * @return
     */
    void selectClassToExcel(HttpServletResponse response,Integer taskId, Long teachingClassId, String teachingClassName, String gradeId, String gradeName, Long courseId, String courseName, Integer isEnable);

    /**
     * 导出对应拆班
     * @param response
     * @param taskId
     * @param teachingClassId
     * @param teachingClassName
     * @param subType
     * @param subTypeName
     * @param gradeId
     * @param gradeName
     * @param courseId
     * @param courseName
     * @param isEnable
     * @return
     */
    void subClassToExcel(HttpServletResponse response, Integer taskId, Long teachingClassId, String teachingClassName, Integer subType, String subTypeName, String gradeId, String gradeName, Long courseId, String courseName, Integer isEnable);

    /**
     * 导出对应合班
     * @param response
     * @param taskId
     * @param teachingClassId
     * @param teachingClassName
     * @param gradeId
     * @param gradeName
     * @param courseId
     * @param courseName
     * @param isEnable
     * @return
     */
    void mixClassToExcel(HttpServletResponse response, Integer taskId, Long teachingClassId, String teachingClassName, String gradeId, String gradeName, Long courseId, String courseName, Integer isEnable);


    /**
     * 拆班导入
     * @param taskId
     * @param file
     * @return
     */
    void excelToSubClass(Integer taskId, MultipartFile file, HttpServletResponse response,Integer flag);

    /**
     * 教学班教室设置
     * @param taskId
     * @param roomId
     * @param teachingClassId
     * @return
     */
    String setTeachingClassRoom(Integer taskId, Integer roomType, Long teachingClassId);




    /**
     * 批量设置场地类型
     * @param taskId
     * @param updateBatchRoomType
     * @return
     */
    String updateBatchRoomType(Integer taskId, UpdateBatchRoomType updateBatchRoomType);


    /**
     * 获取对应行政班
     * @param taskId
     * @param gradeId
     * @param typeId
     * @param courseId
     * @param classId
     * @param isEnable
     * @param pageSize
     * @param currentPage
     * @return
     */
    TeachingClassByClass getClassInfoListV2(Integer taskId, String gradeId, Integer typeId, Long courseId, Long classId, Integer isEnable, Integer pageSize, Integer currentPage);

    String setSubTeachingClassRoom(Integer taskId, Long roomId, List<Long> teachingClassId);

    /**
     * 删除合班
     * @param taskId
     * @param mergeTeachingClass
     * @return
     */
    String deleteMergeTeachingClass(Integer taskId, List<Long> mergeTeachingClass);

    /**
     * 批量设置教室
     * @param taskId
     * @param updateBatchRoom
     * @return
     */
    String updateBatchRoomId(Integer taskId, UpdateBatchRoom updateBatchRoom);

    /**
     * 判断拆班是否设置成功
     * @param taskId
     * @return
     */
    List<String> checkSubClassIsEnbale(Integer taskId);
}
